package com.scap.dfs.model;

import java.io.Serializable;

import javax.persistence.*;

import org.apache.commons.collections.functors.FalsePredicate;


/**
 * The persistent class for the DAILY_CAL_FORMULA database table.
 * 
 */
@Entity
@Table(name="DAILY_CAL_FORMULA")
@NamedQuery(name="DailyCalFormula.findAll", query="SELECT d FROM DailyCalFormula d")
public class DailyCalFormula implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private DailyCalFormulaPK id;

	@Column(name="ACTIVATION",columnDefinition="BIT",nullable=false)
	private Boolean activation;

	@Column(name="FLOW_NUMBER",nullable=false)
	private Integer flowNumber;

	@Column(name="FORMULA_NAME",columnDefinition="NVARCHAR(255)",nullable=false)
	private String formulaName;

	@Column(name="VAR1_COLUMN_NAME",columnDefinition="NVARCHAR(255)",nullable=false)
	private String var1ColumnName;

	@Column(name="VAR2_COLUMN_NAME",columnDefinition="NVARCHAR(255)",nullable=true)
	private String var2ColumnName;

	@Column(name="VAR3_COLUMN_NAME",columnDefinition="NVARCHAR(255)",nullable=true)
	private String var3ColumnName;
	
	@Column(name="UPDATE_DATE",columnDefinition="NVARCHAR(20)",nullable=false)
	private String updateDate;

	@Column(name="UPDATE_TIME",columnDefinition="NVARCHAR(20)",nullable=false)
	private String updateTime;

	public DailyCalFormula() {
	}

	public DailyCalFormulaPK getId() {
		return this.id;
	}

	public void setId(DailyCalFormulaPK id) {
		this.id = id;
	}

	public Boolean getActivation() {
		return this.activation;
	}

	public void setActivation(Boolean activation) {
		this.activation = activation;
	}

	public Integer getFlowNumber() {
		return this.flowNumber;
	}

	public void setFlowNumber(Integer flowNumber) {
		this.flowNumber = flowNumber;
	}

	public String getFormulaName() {
		return this.formulaName;
	}

	public void setFormulaName(String formulaName) {
		this.formulaName = formulaName;
	}

	public String getVar1ColumnName() {
		return this.var1ColumnName;
	}

	public void setVar1ColumnName(String var1ColumnName) {
		this.var1ColumnName = var1ColumnName;
	}

	public String getVar2ColumnName() {
		return this.var2ColumnName;
	}

	public void setVar2ColumnName(String var2ColumnName) {
		this.var2ColumnName = var2ColumnName;
	}

	public String getVar3ColumnName() {
		return this.var3ColumnName;
	}

	public void setVar3ColumnName(String var3ColumnName) {
		this.var3ColumnName = var3ColumnName;
	}
	
	public String getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(String updateDate) {
		this.updateDate = updateDate;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((activation == null) ? 0 : activation.hashCode());
		result = prime * result
				+ ((flowNumber == null) ? 0 : flowNumber.hashCode());
		result = prime * result
				+ ((formulaName == null) ? 0 : formulaName.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result
				+ ((updateDate == null) ? 0 : updateDate.hashCode());
		result = prime * result
				+ ((updateTime == null) ? 0 : updateTime.hashCode());
		result = prime * result
				+ ((var1ColumnName == null) ? 0 : var1ColumnName.hashCode());
		result = prime * result
				+ ((var2ColumnName == null) ? 0 : var2ColumnName.hashCode());
		result = prime * result
				+ ((var3ColumnName == null) ? 0 : var3ColumnName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DailyCalFormula other = (DailyCalFormula) obj;
		if (activation == null) {
			if (other.activation != null)
				return false;
		} else if (!activation.equals(other.activation))
			return false;
		if (flowNumber == null) {
			if (other.flowNumber != null)
				return false;
		} else if (!flowNumber.equals(other.flowNumber))
			return false;
		if (formulaName == null) {
			if (other.formulaName != null)
				return false;
		} else if (!formulaName.equals(other.formulaName))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (updateDate == null) {
			if (other.updateDate != null)
				return false;
		} else if (!updateDate.equals(other.updateDate))
			return false;
		if (updateTime == null) {
			if (other.updateTime != null)
				return false;
		} else if (!updateTime.equals(other.updateTime))
			return false;
		if (var1ColumnName == null) {
			if (other.var1ColumnName != null)
				return false;
		} else if (!var1ColumnName.equals(other.var1ColumnName))
			return false;
		if (var2ColumnName == null) {
			if (other.var2ColumnName != null)
				return false;
		} else if (!var2ColumnName.equals(other.var2ColumnName))
			return false;
		if (var3ColumnName == null) {
			if (other.var3ColumnName != null)
				return false;
		} else if (!var3ColumnName.equals(other.var3ColumnName))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "DailyCalFormula [id=" + id + ", activation=" + activation
				+ ", flowNumber=" + flowNumber + ", formulaName=" + formulaName
				+ ", var1ColumnName=" + var1ColumnName + ", var2ColumnName="
				+ var2ColumnName + ", var3ColumnName=" + var3ColumnName
				+ ", updateDate=" + updateDate + ", updateTime=" + updateTime
				+ "]";
	}

	

	
	

}